import { initMixin } from './init'
import { stateMixin } from './state'
import { renderMixin } from './render'
import { eventsMixin } from './events'
import { lifecycleMixin } from './lifecycle'
import { warn } from '../util/index'

function Vue (options) {
  if (process.env.NODE_ENV !== 'production' &&
    !(this instanceof Vue)
  ) {
    warn('Vue is a constructor and should be called with the `new` keyword')
  }
  this._init(options)
}
// 向原型中挂载属性

// 挂载—_init方法
initMixin(Vue)
// 挂_watch $set $delete方法
stateMixin(Vue)
// 挂载$emit $once $on $off方法
eventsMixin(Vue)
// _update $forceUpdate $destroy $off方法
lifecycleMixin(Vue)
// $nextTick _render
renderMixin(Vue)

export default Vue
